package com.hikvision.artemis.sdk;

import org.apache.http.HttpResponse;

import java.util.HashMap;
import java.util.Map;

public class Response {
  private int statusCode;
  private String contentType;
  private String requestId;
  private String errorMessage;
  private Map<String, String> headers;
  private String body;
  private HttpResponse response;

  public int getStatusCode() {
    return this.statusCode;
  }

  public void setStatusCode(int statusCode) {
    this.statusCode = statusCode;
  }

  public String getContentType() {
    return this.contentType;
  }

  public void setContentType(String contentType) {
    this.contentType = contentType;
  }

  public String getRequestId() {
    return this.requestId;
  }

  public void setRequestId(String requestId) {
    this.requestId = requestId;
  }

  public String getErrorMessage() {
    return this.errorMessage;
  }

  public void setErrorMessage(String errorMessage) {
    this.errorMessage = errorMessage;
  }

  public Map<String, String> getHeaders() {
    return this.headers;
  }

  public String getHeader(String key) {
    if (null != this.headers) {
      return this.headers.get(key);
    }
    return null;
  }

  public void setHeaders(Map<String, String> headers) {
    this.headers = headers;
  }

  public void setHeader(String key, String value) {
    if (null == this.headers) {
      this.headers = new HashMap<String, String>();
    }
    this.headers.put(key, value);
  }

  public String getBody() {
    return this.body;
  }

  public void setBody(String body) {
    this.body = body;
  }

  public HttpResponse getResponse() {
    return this.response;
  }

  public void setResponse(HttpResponse response) {
    this.response = response;
  }
}
